package com.imc.beans;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * GroupListId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class GroupListId implements java.io.Serializable {

	// Fields

	private Integer uid;
	private String groupName;
	private Integer groupDate;
	private Integer corpId;

	// Constructors

	/** default constructor */
	public GroupListId() {
	}

	/** minimal constructor */
	public GroupListId(Integer uid) {
		this.uid = uid;
	}

	/** full constructor */
	public GroupListId(Integer uid, String groupName, Integer groupDate,
			Integer corpId) {
		this.uid = uid;
		this.groupName = groupName;
		this.groupDate = groupDate;
		this.corpId = corpId;
	}

	// Property accessors

	@Column(name = "uid", nullable = false)
	public Integer getUid() {
		return this.uid;
	}

	public void setUid(Integer uid) {
		this.uid = uid;
	}

	@Column(name = "group_name", length = 100)
	public String getGroupName() {
		return this.groupName;
	}

	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}

	@Column(name = "group_date")
	public Integer getGroupDate() {
		return this.groupDate;
	}

	public void setGroupDate(Integer groupDate) {
		this.groupDate = groupDate;
	}

	@Column(name = "corp_id")
	public Integer getCorpId() {
		return this.corpId;
	}

	public void setCorpId(Integer corpId) {
		this.corpId = corpId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof GroupListId))
			return false;
		GroupListId castOther = (GroupListId) other;

		return ((this.getUid() == castOther.getUid()) || (this.getUid() != null
				&& castOther.getUid() != null && this.getUid().equals(
				castOther.getUid())))
				&& ((this.getGroupName() == castOther.getGroupName()) || (this
						.getGroupName() != null
						&& castOther.getGroupName() != null && this
						.getGroupName().equals(castOther.getGroupName())))
				&& ((this.getGroupDate() == castOther.getGroupDate()) || (this
						.getGroupDate() != null
						&& castOther.getGroupDate() != null && this
						.getGroupDate().equals(castOther.getGroupDate())))
				&& ((this.getCorpId() == castOther.getCorpId()) || (this
						.getCorpId() != null && castOther.getCorpId() != null && this
						.getCorpId().equals(castOther.getCorpId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getUid() == null ? 0 : this.getUid().hashCode());
		result = 37 * result
				+ (getGroupName() == null ? 0 : this.getGroupName().hashCode());
		result = 37 * result
				+ (getGroupDate() == null ? 0 : this.getGroupDate().hashCode());
		result = 37 * result
				+ (getCorpId() == null ? 0 : this.getCorpId().hashCode());
		return result;
	}

}